Description
This sample demonstrates how you can use Macromedia Flash to create complex
games. It features a timer and rotating puzzle pieces that snap into position
when placed in the target area. ActionScript is used to track the position
and rotation of each piece, and the game will detect when the puzzle is
assembled properly.
Key features and ActionScript elements
Register Object Class, attachMovie, Draggable movie clips, dynamic text
fields, functions, conditions (if...), loops (for...), Math object, modulo,
getTimer
Instructions
Click OK to begin. Drag the puzzle pieces into the target area to assemble
the puzzle. Alt-click (Windows) or Option-click (Macintosh) a piece to
rotate it 90 degrees. Shift-click a piece to display its number in the
small circle below the lower right corner of the target area. Toggle any
of the options at the lower left portion of the stage to adjust the difficulty
of the puzzle.
The source file for this movie (Jigsaw_puzzle.fla) can be found on the
Flash MX CD in the Goodies/Samples/FLA folder.